package com.joy.web.admin.mapper;

import com.joy.web.admin.entity.Resource;
import com.joy.web.base.mapper.IBaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author yjzhao
 * @since 2019-09-16
 */
public interface ResourceMapper extends IBaseMapper<Resource> {

    /**
     * @Description 根据用户名获取所有权限
     * @param userNm
     * @return
     * @Author yjzhao
     * @Date 2019/9/17 16:05
     **/
    List<String> getPermissionsByUserNm(@Param("userNm") String userNm) throws Exception;

    /**
     * @Description 根据用户名获取用户所拥有的所有
     * @param userNm
     * @return
     * @Author yjzhao
     * @Date 2019/9/17 16:21
     **/
    List<Resource> getResourceMenuByUserNm(@Param("userNm") String userNm) throws Exception;
}
